        <!DOCTYPE html>
        <html>
        <head>
                <meta charset="utf-8">
        <title>Features class / box2d Library / Dart Documentation</title>
        <link rel="stylesheet" type="text/css"
            href="../styles.css">
        <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" rel="stylesheet" type="text/css">
        <link rel="shortcut icon" href="../favicon.ico">
        
        </head>
        <body data-library="box2d" data-type="Features">
        <div class="page">
        <div class="header">
          <a href="../index.html"><div class="logo"></div></a>
          <a href="../index.html">Dart Documentation</a>
         &rsaquo; <a href="../box2d.html">box2d</a> &rsaquo; <a href="../box2d/Features.html">Features</a>        <div id="search-box">
          <input type="search" name="q" id="q" autocomplete="off"
              class="search-input" placeholder="Search API">
        </div>
        
      </div>
      <div class="drop-down" id="drop-down"></div>
      
        <div class="nav">
        
</div>
<div class="content">
        <h2><strong>Features</strong>
          class
        </h2>
        
<button id="show-inherited" class="show-inherited">Hide inherited</button>
<div class="doc">
<pre class="source">
class Features {
 /** The edge that defines the outward contact normal. */
 int referenceEdge;

 /** The edge most anti-parallel to the reference edge. */
 int incidentEdge;

 /** The vertex (0 or 1) on the incident edge that was clipped. */
 int incidentVertex;

 /** A value of 1 indicates that the reference edge is on shape2. */
 int flip;

 /**
  * Constructs a new features with zero values for all fields.
  */
 Features() :
   referenceEdge = 0,
   incidentEdge = 0,
   incidentVertex = 0,
   flip = 0 { }

 // Constructs a new Features that is a copy of the given features.
 Features.copy(Features f) :
   referenceEdge = f.referenceEdge,
   incidentEdge = f.incidentEdge,
   incidentVertex = f.incidentVertex,
   flip = f.flip { }

 // Set this feature to be a copy of the given feature.
 void setFrom(Features f) {
   referenceEdge = f.referenceEdge;
   incidentEdge = f.incidentEdge;
   incidentVertex = f.incidentVertex;
   flip = f.flip;
 }

 /**
  * Returns true if this Features object is equal to the given object.
  */
 bool operator ==(other) =&gt;
   referenceEdge == other.referenceEdge &amp;&amp;
   incidentEdge == other.incidentEdge &amp;&amp;
   incidentVertex == other.incidentVertex &amp;&amp; flip == other.flip;

 /**
  * Returns a String representation of this Features.
  */
 String toString() {
   return "Features: ($flip, $incidentEdge, $incidentVertex $referenceEdge)";
 }

 /**
  * Sets all features to 0.
  */
 zero() {
   referenceEdge = 0;
   incidentEdge = 0;
   incidentVertex = 0;
   flip = 0;
 }
}
</pre>
</div>
<div>
<h3>Constructors</h3>
<div class="method"><h4 id="Features">
<button class="show-code">Code</button>
new <strong>Features</strong>() <a class="anchor-link" href="#Features"
              title="Permalink to Features.Features">#</a></h4>
<div class="doc">
<p>Constructs a new features with zero values for all fields.</p>
<pre class="source">
Features() :
 referenceEdge = 0,
 incidentEdge = 0,
 incidentVertex = 0,
 flip = 0 { }
</pre>
</div>
</div>
<div class="method"><h4 id="Features.copy">
<button class="show-code">Code</button>
new <strong>Features.copy</strong>(<a href="../box2d/Features.html">Features</a> f) <a class="anchor-link" href="#Features.copy"
              title="Permalink to Features.Features.copy">#</a></h4>
<div class="doc">
<pre class="source">
Features.copy(Features f) :
 referenceEdge = f.referenceEdge,
 incidentEdge = f.incidentEdge,
 incidentVertex = f.incidentVertex,
 flip = f.flip { }
</pre>
</div>
</div>
</div>
<div>
<h3>Properties</h3>
<div class="field"><h4 id="flip">
<button class="show-code">Code</button>
int         <strong>flip</strong> <a class="anchor-link"
            href="#flip"
            title="Permalink to Features.flip">#</a>
        </h4>
        <div class="doc">
<pre class="source">
flip
</pre>
</div>
</div>
<div class="field"><h4 id="incidentEdge">
<button class="show-code">Code</button>
int         <strong>incidentEdge</strong> <a class="anchor-link"
            href="#incidentEdge"
            title="Permalink to Features.incidentEdge">#</a>
        </h4>
        <div class="doc">
<pre class="source">
incidentEdge
</pre>
</div>
</div>
<div class="field"><h4 id="incidentVertex">
<button class="show-code">Code</button>
int         <strong>incidentVertex</strong> <a class="anchor-link"
            href="#incidentVertex"
            title="Permalink to Features.incidentVertex">#</a>
        </h4>
        <div class="doc">
<pre class="source">
incidentVertex
</pre>
</div>
</div>
<div class="field"><h4 id="referenceEdge">
<button class="show-code">Code</button>
int         <strong>referenceEdge</strong> <a class="anchor-link"
            href="#referenceEdge"
            title="Permalink to Features.referenceEdge">#</a>
        </h4>
        <div class="doc">
<pre class="source">
referenceEdge
</pre>
</div>
</div>
</div>
<div>
<h3>Operators</h3>
<div class="method"><h4 id="==">
<button class="show-code">Code</button>
bool <strong>operator ==</strong>(other) <a class="anchor-link" href="#=="
              title="Permalink to Features.operator ==">#</a></h4>
<div class="doc">
<p>Returns true if this Features object is equal to the given object.</p>
<pre class="source">
bool operator ==(other) =&gt;
 referenceEdge == other.referenceEdge &amp;&amp;
 incidentEdge == other.incidentEdge &amp;&amp;
 incidentVertex == other.incidentVertex &amp;&amp; flip == other.flip;
</pre>
</div>
</div>
</div>
<div>
<h3>Methods</h3>
<div class="method"><h4 id="setFrom">
<button class="show-code">Code</button>
void <strong>setFrom</strong>(<a href="../box2d/Features.html">Features</a> f) <a class="anchor-link" href="#setFrom"
              title="Permalink to Features.setFrom">#</a></h4>
<div class="doc">
<pre class="source">
void setFrom(Features f) {
 referenceEdge = f.referenceEdge;
 incidentEdge = f.incidentEdge;
 incidentVertex = f.incidentVertex;
 flip = f.flip;
}
</pre>
</div>
</div>
<div class="method"><h4 id="toString">
<button class="show-code">Code</button>
String <strong>toString</strong>() <a class="anchor-link" href="#toString"
              title="Permalink to Features.toString">#</a></h4>
<div class="doc">
<p>Returns a String representation of this Features.</p>
<pre class="source">
String toString() {
 return "Features: ($flip, $incidentEdge, $incidentVertex $referenceEdge)";
}
</pre>
</div>
</div>
<div class="method"><h4 id="zero">
<button class="show-code">Code</button>
<strong>zero</strong>() <a class="anchor-link" href="#zero"
              title="Permalink to Features.zero">#</a></h4>
<div class="doc">
<p>Sets all features to 0.</p>
<pre class="source">
zero() {
 referenceEdge = 0;
 incidentEdge = 0;
 incidentVertex = 0;
 flip = 0;
}
</pre>
</div>
</div>
</div>
        </div>
        <div class="clear"></div>
        </div>
        <div class="footer">
          
        </div>
        <script async src="../client-live-nav.js"></script>
        </body></html>
        
